package c.c.b.b.d;

import b.i.b.f;
import c.c.b.b.f.p;
import c.c.b.b.f.p.a;
import java.io.UnsupportedEncodingException;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: JsonObjectRequest */
public class m extends n<JSONObject> {
    public m(int i, String str, JSONObject jSONObject, a<JSONObject> aVar) {
        this(i, str, jSONObject == null ? null : jSONObject.toString(), (a) aVar);
    }

    public p<JSONObject> a(c.c.b.b.f.m mVar) {
        try {
            return new p(new JSONObject(new String(mVar.b, f.l(mVar.c, "utf-8"))), f.f(mVar));
        } catch (UnsupportedEncodingException e) {
            return new p(new c.c.b.b.h.f(e));
        } catch (JSONException e2) {
            return new p(new c.c.b.b.h.f(e2));
        }
    }

    public m(int i, String str, String str2, a<JSONObject> aVar) {
        super(i, str, str2, aVar);
    }
}
